import Vue from 'vue'
import App from './App.vue'
import router from './router'

import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import lgForm from 'lg-form'
import 'lg-form/dist/FormMaking.css'
import Vant from 'vant'
import 'vant/lib/index.css'

import * as utils from './utils'
import * as filters from './filters'
import VueWechatTitle from 'vue-wechat-title' // global filters

// register global utility filters
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})
Object.keys(utils).forEach(key => {
  Vue.prototype[key] = utils[key]
})

Vue.use(Vant)
Vue.use(lgForm)
Vue.use(Element, {
  size: 'small' // set element-ui default size
})

Vue.use(VueWechatTitle)
Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
